package com.gsy.exception;



import java.text.MessageFormat;


/**
 * api异常
 * @author hthuang
 * @date 2018年1月22日
 */
public class ApiException extends RuntimeException {

	/***/
	private static final long serialVersionUID = -4747805149880826772L;

	/**
	 * 使用MessageFormat.format格式化
	 */
	public ApiException(String pattern, Object... arguments) {
		this(MessageFormat.format(pattern, arguments));
	}

	public ApiException(String message, Throwable cause) {
		super(message, cause);
	}

	public ApiException(String message) {
		super(message);
	}

	public ApiException(BusinessException be) {
		this(be.getMessage());
	}

}
